Add Superelevation to a corridor
Superelevation lanes define the horizontal geometry, offsets, and cross slope for superelevated areas. The below code shows how to create superelevation section , how to create lanes and how to add superelevations to corridor.
Example
public bool AddSuperelevationToCorridor(Corridor corridor)
{
//Create active connection ConsensusConnectionEdit
Bentley.CifNET.SDK.Edit.ConsensusConnectionEdit con = Bentley.CifNET.SDK.Edit.ConsensusConnectionEdit.GetActive();
//Get Geometric model
Bentley.CifNET.GeometryModel.SDK.GeometricModel gm = con.GetActiveGeometricModel();
if (gm == null) return false;
//Create SuperElevation Sections
string sectionName = "Section1";
double startDistance = corridor.StartDistance;
double endDistance = corridor.EndDistance;
string featureType = "SuperElevation\\Superelevation";
Bentley.CifNET.GeometryModel.SDK.SuperElevationSection superEleSection = gm.
CreateSingleSuperElevationSection(sectionName, startDistance, endDistance, corridor.CorridorAlignment);
if (superEleSection == null)
return false;
//Set FeatureDefinition to the SuperElevation Section
bool status = superEleSection.SetFeatureDefinition(featureType);
//Create superelevation lanes
//Create a SuperElevation Lane Right
Bentley.CifNET.GeometryModel.SDK.SuperElevationType superElevationType = SuperElevationType.Primary;
Bentley.CifNET.GeometryModel.SDK.Side superElevationRightSide = Side.Right;
string rightLaneName = "RightLane";
double insideEdgeOffset = 10;
double width = 10;
double slope = 0.02;
double laneStartDistance = corridor.StartDistance;
double laneEndDistance = corridor.EndDistance;
Bentley.CifNET.GeometryModel.SDK.SuperElevation superElevationLaneRight = superEleSection.AddSuperElevation(superElevationType,
rightLaneName, superElevationRightSide, insideEdgeOffset, width, slope,laneStartDistance, laneEndDistance);
//Create a SuperElevation Lane Left
Side superElevationSideLeft = Side.Left;
string leftLaneName = "LeftLane";
Bentley.CifNET.GeometryModel.SDK.SuperElevation superElevationLaneLeft = superEleSection.AddSuperElevation(superElevationType,
leftLaneName, superElevationSideLeft, insideEdgeOffset, width, slope,laneStartDistance, laneEndDistance);
if (null == superElevationLaneRight || null == superElevationLaneLeft) return false;
//Add superelevations to corridor
string superPoint = "EOP_R";
string pivotPoint = "CL";
int priority = 1;
Bentley.CifNET.GeometryModel.SDK.PointControl pointControl1 = superElevationLaneRight.
AddPointControl(superPoint, pivotPoint, startDistance, endDistance, priority, corridor);
if (pointControl1 == null)
return false;
string superPoint2 = "EOP_L";
string pivotPoint2 = "CL";
Bentley.CifNET.GeometryModel.SDK.PointControl pointControl2 =
superElevationLaneLeft.AddPointControl(superPoint2, pivotPoint2, startDistance, endDistance,
priority, corridor);
if (pointControl2 == null)
return false;
return true;
}
The above code creates a superelevation section using GeometricModel.
CreateSingleSuperElevationSection() which takes alignment as parameter.
Superelevation lanes can be defined automatically by assigning a road template. This is an alternate way to create superelevation lanes by using the widths and cross slopes of a specified template along with parameters specified in the Superelevation Rules File. This can be achieved by assigning the template to the SuperElevationSection. Here in above code the lanes are created manually using SuperElevationSection.AddSuperElevation(), here two lanes are created based on Side, one for right side and one for left side of centerline
SuperElevationTransition can be applied here for the SuperElevation, considering above code for objects superElevationLaneRight and superElevationLaneLeft.
Finally, to add the Superelevation to corridor, use SuperElevation.AddPointControl() which takes the corridor object as parameter.